import scrapy
from imgPro.items import ImgproItem


class ImgSpider(scrapy.Spider):
    name = 'img'
    # allowed_domains = ['img.com']
    start_urls = ['https://sc.chinaz.com/tupian/']

    def parse(self, response):
        div_list=response.xpath('//*[@id="container"]/div')
        for div in div_list:
            img_src='https:'+div.xpath('./div/a/img/@src2').extract_first()
            item=ImgproItem()
            item['img_src']=img_src
            yield item




